package com.zzxz.practicaltrainingsys.service;

import com.github.pagehelper.PageInfo;
import com.zzxz.practicaltrainingsys.entity.Weeklynews;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface WeeklynewsService {
    List<Weeklynews> getWeeklynewsByStudentId(Integer studentId);

    Weeklynews getWeeklynewsById(Integer weeklynewsId);

    int insertWeeklynews(Weeklynews weeklynews);

    int updateWeeklynews(Weeklynews weeklynews);

    List<Map<String, Object>> getAllWeeklyNews();

    PageInfo<Map<String, Object>> getWeeklyNewsByPage(Integer pageNum, Integer pageSize);

    List<Weeklynews> getLeaderWeeklyByGroup(@Param("projectId") Integer projectId,
                                            @Param("groupId") Integer groupId);

    List<Map<String, Object>> getWeeklyNewsByProjectId(@Param("projectId") Integer projectId);
}